using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ghasam.Business.Services;

public partial class OrderPoint : System.Web.UI.Page
{
    private IStockService stockService;
    public IStockService StockService
    {
        get { return stockService; }
        set { stockService = value; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        bindGrid();
        if (grdStock.Rows.Count == 0) { lblMsg.Visible = true; }
    }
    void bindGrid()
    {
        grdStock.DataSource = StockService.FindOrderPoint();
        grdStock.DataBind();
    }
    protected void grdStock_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        grdStock.PageIndex = e.NewPageIndex;
        bindGrid();
    }
}
